using Zhaoxi.Zhihu.SharedKerel.Domain;

namespace Zhaoxi.Zhihu.SharedKerel.Repositoy;

public interface IGenericRepository<T>: IReadRepository<T> where T : class, IEntity<int>
{
    /// <summary>
    /// 持久化实体到数据库
    /// </summary>
    /// <param name="cancellationToken"></param>
    /// <returns></returns>
    Task<int> SaveChangesAsync(CancellationToken cancellationToken = default);
}